Ext.Loader.setConfig({
    enabled: true
});

Ext.Ajax.timeout = 30000;
Ext.app.Application.implement({
	
	//加载控制器
	loadController : function(name) {
		var me = this;
		var controller;
		if (!this.controllers.containsKey(name)) {
			controller = Ext.create(
					this.getModuleClassName(name, 'controller'), {
						application : this,
						id : name
					});
			controller.init(this);
			controller.onLaunch(this);
			this.controllers.add(controller);
		}else{
			controller = this.getController(name);
		}
		return controller;
	}
});

Ext.QuickTips.init();

Ext.application({
	controllers: ['MenuController'],
    models: ['MenuTreeModel'],
    stores: ['MenuTreeStore'],
    views:  ['index.Center', 'index.North', 'index.West'],
	
    autoCreateViewport: true,
    name: 'StaffServer',
    title: '职员管理系统',
   	appFolder: 'app'
});